<template>
  <view>
    <view class="content-view">
      <uni-card :border="false">
        <view class="card">
          <view class="title">
            {{detail.title}}
          </view>
          <view class="content">
            {{detail.content}}
          </view>
          <view class="tips" v-if="detail.remark">
            * {{detail.remark}}
          </view>
          <view class="date">
            —— {{detail.createTime}}
          </view>
        </view>
      </uni-card>
    </view>
  </view>
</template>

<script>
  import moment from '../../components/moment.js';
  import {
    messageMsg
  } from '@/api/equip.js'
  export default {
    data() {
      return {
        detail: {},
      }
    },
    onLoad(options) {
      this.detail = JSON.parse(decodeURIComponent(options.detail));
      if (this.detail.status == 0) this.doRead();
    },
    onShow() {},
    methods: {
      // 已读
      doRead() {
        messageMsg('/selectMessageById', 'get', {
          status: 1,
          Id: this.detail.id
        }).then(res => {

        });
      },
    }
  }
</script>

<style lang="less">
  page {
    background-color: #f7f7f7;
  }

  .content-view {
    .card {
      padding: 50upx 0 100upx;
    }

    .title {
      font-size: 40upx;
      font-weight: bold;
      color: #3a3a3a;
      // text-align: center;
      width: 100%;
      display: flex;
      justify-content: center;
      word-break: break-all;
    }

    .content {
      font-size: 28upx;
      line-height: 60upx;
      color: #656565;
      margin: 30upx auto;
      word-break: break-all
    }

    .tips {
      font-size: 28upx;
      color: #4ea7ff;
      word-break: break-all
    }

    .date {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      margin-top: 50upx;
      color: #bdbdbd;
    }
  }
</style>
